package cn.uin.trigger.http;

import cn.uin.api.IRedirectService;
import cn.uin.domain.family.service.IFamilyService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;

import javax.annotation.Resource;

/**
 * @ClassName RedirectController
 * @Description:重定向服务接口实现
 * @Author: Administrator
 * @CreateDate: 2025/11/13 15:30
 * @Version: 1.0
 */
@Slf4j
@Controller()
@CrossOrigin("*")
@RequestMapping("/api/redirect/")
public class RedirectController implements IRedirectService {

	@Resource
	private IFamilyService iFamilyService;

	@Override
	@RequestMapping(value = "activateAddFamily", method = RequestMethod.GET)
	public String activateAddFamily(@RequestParam String token, @RequestParam String email,
	                                @RequestParam Long familyId, RedirectAttributes redirectAttributes, Model model) {
		return iFamilyService.activateAddFamily(token, email, familyId, redirectAttributes, model);
	}

}
